package org.eden.heartbeat.api.model;

import org.eden.heartbeat.api.Constants;

/**
 * Class that holds the information needed to validate if a machine is online.
 *
 * @author trsimoes
 * @version $Revision:$
 */
public class MachineInfo {

    private String host;

    private int port;

    private Integer timeout;

    public MachineInfo(String host, int port) {
        this.host = host;
        this.port = port;
        this.timeout = Constants.REMOTE_MACHINE_DEFAULT_TIMEOUT;
    }

    public MachineInfo(String host, int port, Integer timeout) {
        this.host = host;
        this.port = port;
        this.timeout = timeout;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public Integer getTimeout() {
        return timeout;
    }

    public void setTimeout(Integer timeout) {
        this.timeout = timeout;
    }

    public String getDestinyInfo() {
        return this.host + ":" + this.port;
    }
}